package com.softline.documentsmall.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @Author wph
 * @Date 2021/2/23 13:50
 */
public class tool {
    /**
     * 判断传入字符串是否有中文
     * @param str
     * @return
     */
    public static boolean isContainChinese(String str) {
        Pattern p = Pattern.compile("[\u4e00-\u9fa5]");
        Matcher m = p.matcher(str);
        if (m.find()) {
            return true;
        }
        return false;
    }
}
